/*************************************************
* Title：TinyToolKit
* Author：Opportunity 
* Discribe：定义有限状态机的基类
* CreateTime：2020-04-05 21:28:43
* Version：1.0
* Modify Recoder：
*************************************************/
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace TinyToolKit.FSM
{
    public abstract class FsmSystemBase
    {
        private string _Name;

        public FsmSystemBase()
        {
            _Name = string.Empty;
        }

        public string Name
        {
            get { return _Name; }
            protected set { _Name = (value != null ? value : string.Empty); }
        }

        public string FullName
        {
            get 
            {
                string fullName = OwnerType.FullName;
                if (_Name != string.Empty)
                    fullName = string.Format("{0}.{1}", fullName, _Name);
                return fullName; 
            }
        }

        public abstract Type OwnerType { get; }

        public abstract int FsmStateCount { get; }

        public abstract bool IsRunning { get; }

        public abstract bool IsDestroyed { get; }

        public abstract string CurrentStateName { get; }

        public abstract float CurrentStateTime { get; }

        public abstract void Pause();

        public abstract void Resume();

        internal abstract void Update();

        internal abstract void Shutdown();
    }
}

